﻿using Abp.Configuration.Startup;
using Abp.Localization.Dictionaries;
using Abp.Localization.Dictionaries.Json;
using Abp.Localization.Dictionaries.Xml;
using Abp.Reflection.Extensions;

namespace ARchGL.Platform.Electrocar.Localization
{
    public class LocalizationConfigurer
    {
        public static void Configure(ILocalizationConfiguration config)
        {
            //var asdf = typeof(LocalizationConfigurer).GetAssembly();
            
            config.Sources.Add(
                new DictionaryBasedLocalizationSource(
                    "Sample",//本地化资源名称
                    new JsonEmbeddedFileLocalizationDictionaryProvider(
                        typeof(LocalizationConfigurer).GetAssembly(),// 包含本地化资源的程序集
                        "ARchGL.Platform.Electrocar.Localization.Sample"// 本地化资源命名空间
                        )
                    ));
        }
    }
}
